1. Field
One or more embodiments of the present invention relate to a method, medium, and system for correcting predicted values of pixels making up an image and, more particularly, to a method, medium, and system compressing and recovering an image using such prediction value correction.
2. Description of the Related Art
Conventional image compression techniques include compressing an image using spatial similarities within the image. Standards for this type of spatial similarity based image compression include JPEG (Joint Photographic Expert Group), JPEG 2000, and JPEG LS, for example.
FIG. 1 illustrates such a conventional image compressing system. Referring to FIG. 1, the image compressing system includes a subtracter 11, an encoder 12, a recovering unit 13 and a prediction unit 14. The subtracter 11 subtracts a predicted value of a currently processed pixel, from among pixels making up an image, from an input actual value of the pixel to obtain a difference between the actual value and the predicted value of the pixel. Then the encoder 12 encodes the difference between the actual value and the predicted value of the pixel. Subsequently, the recovering unit 13 decodes the encoded result to recover the difference between the actual value and the predicted value of the pixel, and adds the recovered difference to values of colors of a reference pixel for the pixel to generate a recovery value of the pixel. The prediction unit 14 then predicts a value for the pixel from the value of the reference pixel corresponding to the pixel, from among pixels making up an image, as recovered by the recovering unit 13.
As the difference between the actual value of a pixel making up an image and a predicted value of the pixel, that is, an error of the predicted value, approximates zero, image compression rates increase. Accordingly, a technique is desired for predicting values of pixels making up an image such that the predicted values closely approximate the actual values of the pixels for improving image compression rates. For example, in JPEG-LS, a technique of correcting predicted values of pixels forming an image based on context in the image was proposed in order to more correctly predict the values of the pixels. This technique is based on the assumption that the accuracy of prediction for the value of a pixel belonging to a past context in the image is similar to the accuracy of prediction for the value of a pixel belonging to a current context identical or similar to the past context. For example, when an error of a predicted value of a pixel of a past context similar or identical to the context for a current pixel is +10, the accuracy of prediction for values of colors of the current pixel can be improved by adding a corresponding predetermined positive number to a predicted value of the current pixel.
FIG. 2 illustrates such a conventional JPEG-LS image compressing system. Referring to FIG. 2, the conventional JPEG-LS image compressing system includes a subtracter 21, an encoder 22, a recovering unit 23, a prediction unit 24, and a context-based correction unit 25. The components of the image compressing system correspond to the components of the image compressing system illustrated in FIG. 1 except for the addition of the context-based correction unit 25.
In such a JPEG-LS technique, a single context can be defined as a combination of a difference D1 between recovered values of colors of a pixel located along the top and to the left of a certain pixel and recovered values of colors of a pixel located left of the certain pixel, a difference D2 between recovered values of colors of a pixel located along the top of the certain pixel and recovered values of colors of a pixel located along the top and left of the certain pixel, and a difference D3 between recovered values of colors of a pixel located along the top and right of the certain pixel and recovered values of colors of a pixel along the top of the certain pixel. Furthermore, in JPEG-LS, the differences D1, D2 and D3 are quantized to nine values and a quantization value Q whose first non-zero component is a negative number is represented as −Q so as to produce (729/2)+1, that is, 365, contexts.
When errors of predicted values of colors of pixels making up an image are calculated, the context-based correction unit 25 accumulates a currently calculated error to the context for a pixel from among the 365 contexts and calculates an average of accumulated errors. The average of accumulated errors corresponds to an error of the context of the pixel. This operation is accumulatively performed from an initially processed pixel from among the pixels making up the image to the currently processed pixel. Furthermore, based on such contexts, the context-based correction unit 25 corrects predicted values of colors of a pixel, generated by the prediction unit 24, based on errors of predicted values of colors of a pixel represented by a context identical or similar to the context of the pixel from among previously accumulated contexts of multiple pixels in the image.